#include <iostream>
#include <algorithm>
#include <string>
using namespace std;
const int N = 205;
string s1, s2, s;
int a1[N], a2[N];
int main() {
	cin >> s1 >> s2;
	int len1 = s1.length();
	int len2 = s2.length();
	if (len1 < len2 || (len1 == len2 && s1 < s2)) {
		s = s1;
		s1 = s2;
		s2 = s;
		cout << '-';
	}
	for (int i = 1; i <= len1; i++) {
		a1[i] = s1[len1 - i] - '0';
	}
	for (int i = 1; i <= len2; i++) {
		a2[i] = s2[len2 - i] - '0';
	}
	len1 = max (len1, len2);
	for (int i = 1; i <= len1; i++) {
		if (a1[i] < a2[i]) {
			a1[i] -= a2[i];
			a1[i + 1]--;
			a1[i] += 10;
		} else {
			a1[i] -= a2[i];
		}
	}
	while (a1[len1] == 0 && len1 > 1) {
		len1--;
	}
	for (int i = len1; i >= 1; i--) {
		cout << a1[i];
	}
	cout << endl;
	return 0;
}